<?php echo $header; ?>
<?php echo $column_left; ?>
<div id="content">
    <div class="top toptitle">
        <div class="left"></div>
        <div class="center">
            <h1><?php echo $heading_title; ?></h1>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="middle">
        <?php if ($products) { ?>
        <div class="sort">
            <div class="div1">
                <select name="sort" onchange="location=this.value">
                    <?php foreach ($sorts as $sorts) { ?>
                    <?php if (($sort . '-' . $order) == $sorts['value']) { ?>
                    <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
                    <?php } else { ?>
                    <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
                    <?php } ?>
                    <?php } ?>
                </select>
            </div>
            <div class="div2"><?php echo $text_sort; ?></div>
        </div>
        <div class="clearfix"></div>
        <div class="product-grid">
        <?php foreach($products as $key => $value){ ?>
        <div>
            <a href="<?php echo $value['href']; ?>"><img class='image' src="<?php echo $value['thumb']; ?>" title="<?php echo $value['name']; ?>" alt="<?php echo $value['name']; ?>" ></a>
            <div class="info-pro">
                <a href="<?php echo $value['href']; ?>"><?php echo $value['name']; ?></a>
            </div>
<!--            <div class="code"><a href="#">APX300, APX400</a></div>-->
            <?php if($value['price'] == 0): ?>
            <div class="price"><a href="#">Liên hệ</a></div>
            <?php else: ?>
            <div class="price"><a href="#"><?php echo number_format($value['price']).' VNĐ'; ?></a></div>
            <?php endif;?>
        </div>
        <?php } ?>
        </div>
        <div class="clearfix"></div>
        <div class="pagination"><?php echo $pagination; ?></div>
        <?php } ?>
    </div>

</div>
<?php echo $footer; ?>